project(TChatServer)
include(../../head.cmake)
include_directories(${PROJECT_SOURCE_DIR}/../../xncc_platform/user_if/inc)
include_directories(./inc)
include_directories(../../xncc_log/include)
include_directories(./SQLiteCpp/include)
include_directories(./data/inc)

# 查找当前目录下的所有源文件
# 并将名称保存到 DIR_SRCS 变量
aux_source_directory(./src SRC_LIST)
aux_source_directory(./data/src SRC_LIST)
link_directories(${PROJECT_SOURCE_DIR}/../../lib)
link_directories(${PROJECT_SOURCE_DIR}/../../xncc_log/lib)
link_directories(${PROJECT_SOURCE_DIR}/SQLiteCpp/build)
link_directories(${PROJECT_SOURCE_DIR}/SQLiteCpp/build/sqlite3)

add_executable(${PROJECT_NAME} ${SRC_LIST})
target_link_libraries(${PROJECT_NAME}
    xncc_platform
    pthread
    libxncc_log_static.a
    SQLiteCpp
    sqlite3
)
